<template>
  <!-- 当月施工方案回退通报（包括施组、ABCD方案） -->
   <a-table class="takeOut-hover" :columns="columns" bordered :pagination="false" :data-source="tableData"  :scroll="{ x: 1500}">
    <span slot="serial" slot-scope="text, record, index">{{ index + 1 }}</span>
  </a-table>
</template>
<script>

import { mergeCellKey } from './mergeCell'
export default {
  name: 'a' + Date.now(),
  props: {
    tableData: {
      type: Array,
      default() {
        return []
      }
    }
  },
  data() {
    this.columns = [
      { title: '序号',align: 'center', dataIndex: 'serial', width: 85,scopedSlots: { customRender: 'serial' } },
      {
        title: '分公司',
        align: 'center',
        dataIndex: 'basicInformationId',
        ellipsis: true,
        width: 250,
        customRender: (value, row, index) => { 
          const obj = {
            children: row.basicStatusStr,
            attrs: {}
          }
          obj.attrs.rowSpan = mergeCellKey(row.basicInformationId, this.tableData, 'basicInformationId',index)
          return obj
        }
      },
      { title: '项目名称', align: 'center', dataIndex: 'controlLevelName', width: 290,},
      { title: '施工方案名称', dataIndex: 'duration', align: 'center', ellipsis: true, width: 200,},
      { title: '方案类别', dataIndex: 'startTime', align: 'center', ellipsis: true, width: 150,},
      { title: '编制人', dataIndex: 'startTime2', align: 'center', ellipsis: true, width: 150,},
      { title: '计划报审时间', dataIndex: 'startTime3', align: 'center', ellipsis: true, width: 150,},
      { title: '实际审批时间', dataIndex: 'startTime4', align: 'center', ellipsis: true, width: 200,},
      { title: '状态', dataIndex: 'startTime5', align: 'center', ellipsis: true,    width: 200,},
    ]
    return {
    }
  },
  methods: {
  },
  mounted() {
  }
}
</script>
<style lang="less">
</style>
